const getConsumeRecord = require("./getConsumeRecord/index");
const getConsumeDetail = require("./getConsumeDetail/index");
const exportConsumeRecord = require("./exportConsumeRecord/index");
const getVipInfoRecord = require("./getVipInfoRecord/index");
const getVipInfoDetail = require("./getVipInfoDetail/index");
const exportVipInfoRecord = require("./exportVipInfoRecord/index");
const getVipUpgradeRecord = require("./getVipUpgradeRecord/index");
const getVipUpgradeDetail = require("./getVipUpgradeDetail/index");
const getVipDiscountRecord = require("./getVipDiscountRecord/index");
const getVipDiscountDetail = require("./getVipDiscountDetail/index");
const exportVipDiscountRecord = require("./exportVipDiscountRecord/index");
const getVipCouponRecord = require("./getVipCouponRecord/index");
const getVipCouponDetail = require("./getVipCouponDetail/index");
const exportVipCouponRecord = require("./exportVipCouponRecord/index");
const getCouponChart = require("./getCouponChart/index");

// 云函数入口函数
exports.main = async (event, context) => {
    switch (event.type) {
        case "getConsumeRecord":
            return await getConsumeRecord.main(event, context);
        case "getConsumeDetail":
            return await getConsumeDetail.main(event, context);
        case "exportConsumeRecord":
            return await exportConsumeRecord.main(event, context);
        case "getVipInfoRecord":
            return await getVipInfoRecord.main(event, context);
        case "getVipInfoDetail":
            return await getVipInfoDetail.main(event, context);
        case "exportVipInfoRecord":
            return await exportVipInfoRecord.main(event, context);
        case "getVipUpgradeRecord":
            return await getVipUpgradeRecord.main(event, context);
        case "getVipUpgradeDetail":
            return await getVipUpgradeDetail.main(event, context);
        case "getVipDiscountRecord":
            return await getVipDiscountRecord.main(event, context);
        case "getVipDiscountDetail":
            return await getVipDiscountDetail.main(event, context);
        case "exportVipDiscountRecord":
            return await exportVipDiscountRecord.main(event, context);
        case "getVipCouponRecord":
            return await getVipCouponRecord.main(event, context);
        case "getVipCouponDetail":
            return await getVipCouponDetail.main(event, context);
        case "exportVipCouponRecord":
            return await exportVipCouponRecord.main(event, context);
        case "getCouponChart":
            return await getCouponChart.main(event, context);
    }
};